package de.fhaugsburg.games.boardgames.tests;

import de.fhaugsburg.games.boardgames.RandomPool;
import de.fhaugsburg.games.boardgames.scrabble.LetterPiece;

public class RandomPoolTest {
	
	public static void fillLetterSack(RandomPool<LetterPiece> pool){
		for (LetterPiece letter : LetterPiece.values()) {
			for (int number = 0; number < letter.getCount(); number++) {
				pool.put(letter);
			}
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		RandomPool<LetterPiece> pool = new RandomPool<LetterPiece>();
		fillLetterSack(pool);
		
		System.out.println("filled letter sack: " +pool.toString());
		
		System.out.println("take one random piece out of the sack: one piece with the letter <<" +pool.take() +">> was removed.");
		
		System.out.println("letter sack: " +pool.toString());
		

	}

}
